package com.greate.community.controller;

import com.greate.community.entity.School;
import com.greate.community.service.SchoolService;
import com.greate.community.util.CommunityConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class SchoolController implements CommunityConstant {

    @Autowired
    private SchoolService schoolService;

    @RequestMapping("/getSchoolByCity")
    public List<School> getSchoolByCity(Long cityId){
        return schoolService.getSchoolByCity(cityId);
    }
}
